import Ember from 'ember';
import ItemRouteMinxin from 'emberworkspace/mixins/item-route-mixin';

export default Ember.Route.extend(ItemRouteMinxin, {
  valueShareer: Ember.inject.service("value-shareer"),
  queryParams: {
    page: {
      refreshModel: true
    },
    q: {
      refreshModel: true
    }
  },
  model(params) {
    console.log("index route called.");
    var self = this;
    return this.mixinedModel("tree", params).then(function(model){
      self.get('valueShareer').set('tree', model);
      return model;
    });
  }
});
